package com.ruoyi.project.manage.scenery.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.manage.scenery.mapper.DwPlaceSceneryMapper;
import com.ruoyi.project.manage.scenery.domain.DwPlaceScenery;
import com.ruoyi.project.manage.scenery.service.IDwPlaceSceneryService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 园内风光信息Service业务层处理
 * 
 * @author mhg
 * @date 2021-10-04
 */
@Service
public class DwPlaceSceneryServiceImpl implements IDwPlaceSceneryService 
{
    @Autowired
    private DwPlaceSceneryMapper dwPlaceSceneryMapper;

    /**
     * 查询园内风光信息
     * 
     * @param id 园内风光信息主键
     * @return 园内风光信息
     */
    @Override
    public DwPlaceScenery selectDwPlaceSceneryById(Long id)
    {
        return dwPlaceSceneryMapper.selectDwPlaceSceneryById(id);
    }

    /**
     * 查询园内风光信息列表
     * 
     * @param dwPlaceScenery 园内风光信息
     * @return 园内风光信息
     */
    @Override
    public List<DwPlaceScenery> selectDwPlaceSceneryList(DwPlaceScenery dwPlaceScenery)
    {
        return dwPlaceSceneryMapper.selectDwPlaceSceneryList(dwPlaceScenery);
    }

    /**
     * 新增园内风光信息
     * 
     * @param dwPlaceScenery 园内风光信息
     * @return 结果
     */
    @Override
    public int insertDwPlaceScenery(DwPlaceScenery dwPlaceScenery)
    {
        dwPlaceScenery.setCreateTime(DateUtils.getNowDate());
        return dwPlaceSceneryMapper.insertDwPlaceScenery(dwPlaceScenery);
    }

    /**
     * 修改园内风光信息
     * 
     * @param dwPlaceScenery 园内风光信息
     * @return 结果
     */
    @Override
    public int updateDwPlaceScenery(DwPlaceScenery dwPlaceScenery)
    {
        return dwPlaceSceneryMapper.updateDwPlaceScenery(dwPlaceScenery);
    }

    /**
     * 批量删除园内风光信息
     * 
     * @param ids 需要删除的园内风光信息主键
     * @return 结果
     */
    @Override
    public int deleteDwPlaceSceneryByIds(String ids)
    {
        return dwPlaceSceneryMapper.deleteDwPlaceSceneryByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除园内风光信息信息
     * 
     * @param id 园内风光信息主键
     * @return 结果
     */
    @Override
    public int deleteDwPlaceSceneryById(Long id)
    {
        return dwPlaceSceneryMapper.deleteDwPlaceSceneryById(id);
    }
}
